// scaup - Scala up!
// (c) 2008-2010, Normen Müller, normen.mueller@gmail.com  
// $Id: JNALibraryLoader.scala 80 2010-05-13 12:31:58Z normen.mueller $
package scaup.io.jna

import com.sun.jna.Native
import scaup.io.OS

/**
 * <i>Note:</i>: No Windows support yet!
 * 
 *  @author <a href="mailto:normen.mueller@googlemail.com">Normen M&#xFC;ller</a>
 *  @version 0.0.5
 */
private[jna] object JNALibraryLoader {
  val cLibrary = if (OS.isOSX || OS.isLinux) (Native.loadLibrary("c", classOf[ICLibrary])).asInstanceOf[ICLibrary] else null
  
  val uid  = try { cLibrary.getuid() } catch { case _ => -1 }
  
  val gid  = try { cLibrary.getgid() } catch { case _ => -1 }   
}
